package com.project.service.goodsOrderService;

import com.github.pagehelper.Page;
import com.github.pagehelper.PageInfo;
import com.project.bean.GoodsOrderBean;
import com.project.bean.GoodsOrderInfoBean;
import com.project.bean.ServeOrderBean;
import com.project.bean.ShopBean;

import java.util.Map;

/**
 * 商品订单接口
 */
public interface IGoodsOrderService {
    public int PAGESIZE = 3;

    /**
     * 门店的商品展示
     * @param pageNO 页码
     * @return 分页对象
     */
    public PageInfo<GoodsOrderBean> findAll(int pageNO, int storeId);

    /**
     * 生成订单 两个添加，一个生成订单对象，一个生成订单详情list
     * @param goodsOrder  订单对象
     */
    public void add(GoodsOrderBean goodsOrder, Map<Integer, ShopBean>shopMap,int userId);

    /**
     * 修改订单状态，同时修改订单详情的状态
     * @param orderId  订单ID
     * @param state 订单状态
     */
    public void update(int orderId, String state);

    /**
     * 按订单id查询订单,并且查询订单详情信息
     * @param orderId 订单id
     * @return 订单对象
     */
    public GoodsOrderBean findById(int orderId);

}
